<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<%@ taglib prefix="user" uri="/WEB-INF/tlds/userName.tld" %>
<%@ taglib prefix="handle" uri="/WEB-INF/tlds/handleMsg.tld" %>
<%@ taglib uri="/WEB-INF/tlds/att.tld" prefix="att"%>
<%@ taglib uri="/WEB-INF/tlds/att_list.tld" prefix="attlist"%>
<html id="ipinHtml">
<head>
<meta name="decorator" content="sysDefault" />
<script type="text/javascript" src="${staticPath}/lib/jquery/1.10.2/jquery.js"></script>
<script type="text/javascript">
document.onreadystatechange = subSomething;//当页面加载状态改变的时候执行这个方法.
function subSomething() {
	if(document.readyState=='complete') {
		var s = window.parent.document.getElementById("workflow");
		s.setAttribute("class", "");
		var opinHeight = 0;
		$("#opinion-table tr").each(function() {
			opinHeight += (this.scrollHeight + 2);
 		});
		var ifm= window.parent.document.getElementById("flowOpinions");
	    if(ifm != null) {
	    	ifm.height = opinHeight;
	    }
 		s.setAttribute("class", "tab-pane");
		
	}
 };
</script>
</head>	
<body>
	<div id="opinion-div" class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
					<table id="opinion-table" class="table table-striped table-bordered table-hover" width="100%">
						<thead>
							<tr>
								<th>开始时间</th>
								<th>节点</th>
								<th>审批人</th>
								<th>意见</th>
								<th>附件</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach items="${list}" var="opi">
								<tr>
									<td class="col-sm-2  text-center"><fmt:formatDate value="${opi.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
									<td class="col-sm-2">${opi.taskName}</td>
									<td class="col-sm-2">${opi.auditorName}</td>
									<td class="col-sm-2">${opi.opinion}</td>
									<td  class="col-sm-2 text-center">
										<c:if test="${opi.taskKey eq 'startNode'}">
											<attlist:listdown key="workflow" soureBillID="${opi.procInstId}" modleName="com.maoye.ossp.bpmagent.model.TaskInstance"></attlist:listdown>
										</c:if>
										<c:if test="${not empty opi.taskId}">
											<attlist:listdown key="workflow" soureBillID="${opi.taskId}" modleName="com.maoye.ossp.bpmagent.model.TaskInstance"></attlist:listdown>
										</c:if> 
									</td> 
								</tr>
							</c:forEach>
						</tbody>
					</table>
			</div>
		</div>
	</div>
</body>
</html>